﻿using CIS.Common.Enums;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CIS.Client.Modules.Operation.Models
{
    public class PortModel : BindableBase
    {
        public string? PortId { get; set; }
        public string? Name { get; set; }
        public string? QualifiedLocationId { get; set; }// name refer to plc map port name P01 P02
        private PortStatus status;

        public PortStatus Status
        {
            get { return status; }
            set { status = value; RaisePropertyChanged(nameof(Status)); }
        }
        public PortEnabled Enable { get; set; }
        public PortUseType PortUseType { get; set; }
        public PortType PortType { get; set; }
        public TransferMode TRSMode { get; set; }
        public bool GetEnable { get; set; }
        private string? lotId;
        public string? LotId
        {
            get { return lotId; }
            set { lotId = value; RaisePropertyChanged(nameof(LotId)); }
        }
        public int LotPriority { get; set; }
        public PortLotStatus LotStatus { get; set; }
        private string? ppid;
        public string? PPID
        {
            get { return ppid; }
            set { ppid = value; RaisePropertyChanged(nameof(PPID)); }
        }
        public int UnitPathNo { get; set; }

        private string? cassetteId;
        public string? CassetteId
        {
            get { return cassetteId; }
            set { cassetteId = value; RaisePropertyChanged(nameof(CassetteId)); }
        }

        private int cassetteSequenceNo;
        public int CassetteSequenceNo
        {
            get { return cassetteSequenceNo; }
            set { cassetteSequenceNo = value; RaisePropertyChanged(nameof(CassetteSequenceNo)); }
        }


        public PortCassetteType CassetteType { get; set; }
        public string? UnitId { get; set; }

        private CassetteProcess cassetteStatus;

        public CassetteProcess CassetteStatus
        {
            get { return cassetteStatus; }
            set { cassetteStatus = value; RaisePropertyChanged(nameof(CassetteStatus)); }
        }
        public string? SlotMap { get; set; }
        public string? SlottoStart { get; set; }

        private int jobCountinCassette = 0;

        public int JobCountinCassette
        {
            get { return jobCountinCassette; }
            set { jobCountinCassette = value; RaisePropertyChanged(nameof(JobCountinCassette)); }
        }

        public PortGlassType PortGlassType { get; set; }
        public PortProductType PortProductType { get; set; }
        public PortJudgeGrade PortJudgeGrade { get; set; }
    }
}
